package com.eduction.service.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.eduction.modules.target.dao.DetailedRepository;
import com.eduction.modules.target.entity.Detailed;
import com.eduction.service.DetailedService;

@Service
public class DetailedServiceImpl implements DetailedService{

	@Autowired
	private DetailedRepository detailedRepository;
	
	@Override
	public List<Detailed> queryDetailedByFid(String fid,String schoolType) throws SQLException {
		if("1495071155575000".equals(schoolType)){
			schoolType="0";
		}else if("1495071155575001".equals(schoolType)){
			schoolType="1";
		}
		List<Detailed> list = detailedRepository.queryDetailedByFid(fid,schoolType);
		return list;
	}

	@Override
	public Detailed queryDetailedByPid(String pid) throws SQLException {
		Detailed d = detailedRepository.queryDetailedByPid(pid);
		return d;
	}

	@Override
	public void saveDetailedInfo(Detailed d) {
		detailedRepository.saveDetailedInfo(d);
		
	}

}
